*. Sticky notes

The tech file has the memory map. Important areas.

DiskExplorer can open both disks (HDM type = plain disk image).
WinXDF is for the XDF type (personally HDM seems easier to work with).

XM6 is really the better emulator (bitplane viewers, memory editors, debugger)
but no memory loggers/breakpoints.


Disk1
- DTW.X		(code)
- LOAD.SPR 	(intro tiles)
- TITLE.GRN	(4-bpp title #1)
- GRP/TITLE.GRP	(8-bpp title #2)
- SPR/BG.SPR	(4-bpp font)

; -----------------------------------------
; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
; -----------------------------------------

DTW.X holds all the code. And text. But the system uses relocatable
code/data packages. Removing the 64-byte header, 32-bit pointers
undergo another offset transformation.

$281C0 gets added at run-time by the BIOS. In my case.
So beware of the RAM dumps.


You're also limited to the default system of 2MB RAM.
Since the game doesn't seem to require more.

RAM starts at $0 in the save states.

; -----------------------------------------
; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
; -----------------------------------------

Title #1:

GRN files are 4-bpp 512-wide planes. The bitmap unpacker will create some
8x8 8-bpp GBA files for easier editing.

The sprites use some fixed table data that gets uploaded to SPR-RAM.
Xpos drops by 1 per frame. Note the 16x16 size font tiles in LOAD.SPR


asm
- sprite_title.txt
- decode_RLE.txt

; -----------------------------------------
; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
; -----------------------------------------

Title #2:

TITLE.GRP is a straight 8-bpp. Take note that the system uses the
text vram as a cache buffer. Like the C64 optimization days.

; -----------------------------------------
; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
; -----------------------------------------

BIOS font gets read for the main text. And the system text menus.
Only $80xx-9Fxx SJIS appears useful.

BIOS can handle 16x16 (16-wide), 8x16 and 8x8.
Look in CG.ROM as 1bpp linear.

Takes 16-bit codes.


You should take time to study the font_* files. Do note that
the 8x8, 8x16, 16x16 are drawn in three seperate routines.
With lots of shared code.


asm
- bios_font.txt
- font_*
- script_hard.txt
- system_*

; -----------------------------------------
; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
; -----------------------------------------

The rest of the game practically uses the BG 4-bpp layer.
And each text uses its own printing/scripting routines (plenty).

For cutscenes, there's a mysterious dictionary code that's unknown.

Printing routines come in a few flavors. But they usually use no more than 2
lines of text (sound/kana).


Most of the text should be in the dumping file.

Pointers range from relocatable-32, offset-16, LEA-16.
Some take cursor codes, # lines, lists or straight text.


Lots of crazy work.

There's also text errors like inserting missing disks. System crashes.

; ============================================================================
; ############################################################################
; ============================================================================

Atlas 1.06 is modified (nothing new since 'Super Robot Wars EX')

> #FILL( int stop_address, int file_byte )		- pads up to stop address
  #FILL( int start, stop, int file_byte )		- pads address range
  #FILL( int start, stop, int file_byte, string file )	- pads address range IN FILE

  #WARN( int warn_address )				- OKAY/BARF if PC counter >= warn_address

  #SAVEPC( string file_name )				- writes PC to file
  #LOADPC( string file_name )				- loads PC from file

  #INSERT( string file_name )				- inserts binary file at current PC

  MSB16,MSB24,MSB32,GB4xxx				- addressing modes

  #SETINDEX( int index_number, int size )		- init the index numbers
  #WRITEINDEX( int address, int index_bump )		- writes index numbers to address, # bytes
							  and auto-bumps the index #
  #WRITEINDEX( int addr, int index_bump, string file )	- writes index number to address IN FILE

  #SAVEINDEX( string file_name )			- writes INDEX # to file
  #LOADINDEX( string file_name )			- loads INDEX # from file

  #ALIGN( int byte_count )                      	- does file alignment (1,2,3,4)

  #W08BYTE( int address, int byte )			- writes byte to address (no JMP)
  #W08BYTE( int addr, int byte, string file )		- writes byte to address IN FILE (no JMP)

  #EMBCLEAR()						- erases all embedded pointers

  #SAVEPTRTABLE( PTRTABLE table, string file_name )	- writes PTRTABLE address to file
  #LOADPTRTABLE( PTRTABLE table, string file_name )	- loads PTRTABLE address from file 

  #WRITEOFS( PTRTABLE table, int offset )		- writes POINTER at an offset amount (from the table start)
